Adds a date interval to a given date a number of times and returns the resulting date.
指定の日付に日付の間隔を何度か追加し、結果の日付を返します。
DateAdd (Add, Count, Date)
DateAdd (Add, Count, Date)
A Variant containing a date.
日付を含むバリエーション。
Add - A string expression from the following table, specifying the date interval.
Add - 日付の間隔を指定する、後続のテーブルからの文字列式。
|
Add (string value)
|
Explanation
|
|
yyyy
|
Year
|
|
q
|
Quarter
|
|
m
|
Month
|
|
y
|
Day of year
|
|
w
|
Weekday
|
|
ww
|
Week of year
|
|
d
|
Day
|
|
h
|
Hour
|
|
n
|
Minute
|
|
s
|
Second
|
Count - A numerical expression specifying how often the Add interval will be added (Count is positive) or subtracted (Count is negative).
Count - Add 間隔が追加される (Count は正) または 減算される (Count は負) 頻度を指定する数式。
Date - A given date or the name of a Variant variable containing a date. The Add value will be added Count times to this value.
Date - 指定の日付、または日付を含むバリエーション変数の名前。Add の値は Count 回この値に追加されます。
Sub example_dateadd
Sub example_dateadd
msgbox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")
msgbox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")
End Sub
End Sub